# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=sushi
pkgver=3.38.1
pkgrel=1
pkgdesc="A quick previewer for Nautilus"
url="https://gitlab.gnome.org/GNOME/sushi"
arch=(x86_64)
license=(GPL2)
groups=(gnome)
depends=(gtk3 gjs libmusicbrainz5 webkit2gtk gtksourceview4 evince
         gst-plugins-base-libs gst-plugin-gtk)
makedepends=(gobject-introspection git meson)
optdepends=('unoconv: OpenDocument formats')
_commit=545dead8bd108b22a7dc09cbb08148adc45fd1a4  # tags/3.38.1^0
source=("git+https://gitlab.gnome.org/GNOME/sushi.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 et:
